module Main where

factorial n = if n == 0 then 1 else n * factorial (n - 1)

f x = x * 2
g x = x + 1

t = f.g

add x y = x + y

fact n a = if n == 0 then a else fact (n - 1) (n * a)

main = do putStrLn "input a number:"
          x <- readLn
          print(factorial x)
          print(t x)
          print(add x x)
          print(fact x 1)
